export default {
  //数据
  data() {
    return {
      portalMainImgUrl: "", //门户主图
      portalSecondImgUrl: "", //门户次图
      about: {} //关于
    }
  },
  created() { //调用方法
    let that = this;
    that.$post(
      that.urls.getFreshPortalIntroduce
    )
      .then(function(res) {
        if(res.success) {
          that.about = res.data;
        }
      })

    //初始化门户图片信息
    that.$post(
      that.urls.getAllPortalConfigList, {
        "type": 0
      }
    )
      .then(function(res) {
        if(res.success) {
          let portalConfigList = res.data;
          for(let i = 0, len = portalConfigList.length; i < len; i++) {
            if(portalConfigList[i].baseType == 0) {
              that.portalMainImgUrl = portalConfigList[i].url; //门户主图
            } else if(portalConfigList[i].baseType == 1) {
              that.portalSecondImgUrl = portalConfigList[i].url; //门户次图
            }
          }
        }
      })
  },
  mounted() {

  },
  methods: { //写函数方法

  }
}
